package org.qu.userdao;

import java.util.List;

import org.qu.util.dao.IDAO;
import org.qu.vo.IsnsRegisterTemp;
import org.qu.vo.IsnsUsers;
/**
 * 用户登陆管理
 * @author 韩进城
 *
 */
public interface IUserDao{
	/**
	 * 验证用户，用户名，密码
	 * @return ajax的方式请求
	 * @throws Exception
	 */
	public boolean isLogin(IsnsUsers user) throws Exception;
	/**
	 * 验证邮箱是否存在
	 * @param name
	 * @return
	 */
	public boolean isEmail(String email) throws Exception;
	
	/**
	 * 用户注册信息添加
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public boolean register(IsnsUsers user) throws Exception;

	/**
	 * 邮箱和密码判断该用户是否已经存在
	 * @param email
	 * @param password
	 * @return
	 * @throws Exception
	 */
	public boolean isEmail(String email,String password) throws Exception;
	/**
	 * 创建临时表的用户数据
	 * @param temp
	 * @return
	 * @throws Exception
	 */
	public boolean doCreateRegisterTemp(IsnsRegisterTemp temp) throws Exception;
	/**
	 * 判读临时表中此人是否存在
	 * @param userEmail 用户邮箱
	 * @param userPwd 用户密码
	 * @return
	 * @throws Exception
	 */
	public IsnsRegisterTemp isRegisterTemp(String userEmail, String userPwd) throws Exception;
	/**
	 * 判断临时表中此人是否存在
	 * @param id  用户id
	 * @param email 用户邮箱
	 * @return
	 * @throws Exception
	 */
	public IsnsRegisterTemp isRegisterTemp(int id,String email) throws Exception;
	
	/**
	 * 删除临时表人员信息
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public boolean removeIsRegisterTemp(int id) throws Exception;
	/**
	 * 批量删除临时表人员信息
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public boolean removeIsRegisterTemp(List<Integer> ids) throws Exception;
	
	/**
	 *  验证临时表email是否存在
	 * @param email
	 * @return
	 * @throws Exception
	 */
	public boolean isRegisterTempEmail(String email) throws Exception;
	
	/**
	 * 查询超过7天的用户id
	 * @return
	 * @throws Exception
	 */
	public List<Integer> getRepeatIds() throws Exception;
	
}
